nextLine: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LA $a0, endl
LI $v0, 4
SYSCALL 
retnextLine: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
inString: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 8
SYSCALL 
retinString: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
outString: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 4
SYSCALL 
retoutString: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
inInt: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 5
SYSCALL 
retinInt: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
outInt: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 1
SYSCALL 
retoutInt: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
inFP_S: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 6
SYSCALL 
retinFP_S: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
outFP_S: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LI $v0, 2
SYSCALL 
retoutFP_S: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
addNum: 
ADDI $sp, $sp, -4
SW $ra, $sp
LA $a0, addPrompt
JAL outString
ForAdd: 
LA $a0, addNum1
JAL outString
JAL inInt
MOVE $t0, $v0
LA $a0, addNum2
JAL outString
JAL inInt
MOVE $t1, $v0
ADD $t2, $t0, $t1
LA $a0, addResult
JAL outString
MOVE $a0, $t2
JAL outInt
LA $a0, addQuitComment
JAL outString
LA $a0, inputQuit1
JAL inString
LW $t3, $a0
LW $t4
BEQ $t3, $t4
J ForAdd
returnAddNum: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
subNum: 
ADDI $sp, $sp, -4
SW $ra, $sp
LA $a0, subPrompt
JAL outString
ForSub: 
LA $a0, subNum1
JAL outString
JAL inInt
MOVE $t5, $v0
LA $a0, subNum2
JAL outString
JAL inInt
MOVE $t6, $v0
SUB $t7, $t5, $t6
LA $a0, subResult
JAL outString
MOVE $a0, $t7
JAL outInt
LA $a0, subQuitComment
JAL outString
LA $a0, inputQuit1
JAL inString
LW $t8, $a0
LW $t9
BEQ $t8, $t9
J ForSub
returnSubNum: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
mulNum: 
ADDI $sp, $sp, -4
SW $ra, $sp
LA $a0, mulPrompt
JAL outString
ForMul: 
LA $a0, mulNum1
JAL outString
JAL inInt
MOVE $t5, $v0
LA $a0, mulNum2
JAL outString
JAL inInt
MOVE $t6, $v0
LA $a0, mulResult
JAL outString
MOVE $a0, $t7
JAL outInt
LA $a0, mulQuitComment
JAL outString
LA $a0, inputQuit1
JAL inString
LW $t8, $a0
LW $t9
BEQ $t8, $t9
J ForMul
returnMulNum: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
divNum: 
ADDI $sp, $sp, -4
SW $ra, $sp
LA $a0, divPrompt
JAL outString
ForDiv: 
LA $a0, divNum1
JAL outString
JAL inInt
MOVE $t5, $v0
LA $a0, divNum2
JAL outString
JAL inInt
MOVE $t6, $v0
DIV $t7, $t5
LA $a0, divResult
JAL outString
MOVE $a0, $t7
JAL outInt
LA $a0, divQuitComment
JAL outString
LA $a0, inputQuit1
JAL inString
LW $t8, $a0
LW $t9
BEQ $t8, $t9
J ForDiv
returnDivNum: 
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
procCmd: 
LA $s0, cmdTable
SLL $a0, $a0, 2
ADD $s1, $s0, $a0
LW $s1, 0($s1)
JR $s1
main: 
ADDI $sp, $sp, -4
SW $ra, 0($sp)
LA $a0, cmdPrompt
mainWhile: 
JAL outString
JAL inInt
MOVE $a0, $v0
JAL procCmd
LA $a0, cmdPrompt2
J mainWhile
retMain: 
LA $a0, goodbyePrompt
JAL outString
LI $v0, 0
LW $ra, 0($sp)
ADDI $sp, $sp, 4
JR $ra
cmdPrompt: 
cmdPrompt2: 
addPrompt: 
subPrompt: 
mulPrompt: 
divPrompt: 
goodbyePrompt: 
addNum1: 
addNum2: 
addResult: 
addQuitComment: 
inputQuit1: 
subNum1: 
subNum2: 
subResult: 
subQuitComment: 
inputQuit2: 
mulNum1: 
mulNum2: 
mulResult: 
mulQuitComment: 
inputQuit3: 
divNum1: 
divNum2: 
divResult: 
divQuitComment: 
inputQuit4: 
cmdTable: 
endl: 
quit: 
